import request from "@/utils/request";

// 查询分类列表
export function listCategory(query) {
  return request({
    url: "/cookbook/category/list",
    method: "get",
    params: query,
  });
}

// 查询分类树结构
export function treeCategory() {
  return request({
    url: "/cookbook/category/tree",
    method: "get",
  });
}

// 获取分类详情
export function getCategory(categoryId) {
  return request({
    url: `/cookbook/category/${categoryId}`,
    method: "get",
  });
}
